<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<div id="box">
			<span id="hour"></span>
			<span class="min"></span>
			<span class="sec"></span>
		</div>
		
		<script>
			let hour = document.getElementById('hour')
			let min = document.querySelector('.min')
			let sec = document.querySelector('.sec')
	
			
			
			// var times = function (){
				
				
			// }
			
			// times();
			
			
			setInterval(function(){
				let time = new Date()
				let h = time.getHours();
				let m = time.getMinutes();
				let s = time.getSeconds();
				s = s < 10 ? "0"+s:s
				hour.innerHTML = h+" :";
				min.innerHTML = m+" :";
				sec.innerHTML = s;
			}, 500);
			
		</script>
	</body>
</html>
